//
//  ReadListCell.m
//  Leisure
//
//  Created by 大展 on 16/6/29.
//  Copyright © 2016年 大展. All rights reserved.
//

#import "ReadListCell.h"

@interface ReadListCell ()

@property (weak, nonatomic) IBOutlet UIImageView *coverimg;  // 背景图
@property (weak, nonatomic) IBOutlet UILabel *content;   // 内容
@property (weak, nonatomic) IBOutlet UILabel *name;          // 专题

@end

@implementation ReadListCell


- (void)awakeFromNib {

}

// 重写父类的方法
- (void)setCellWithModel:(id)model {

    ReadListModel *readListModel = model;
    [self.coverimg sd_setImageWithURL:[NSURL URLWithString:readListModel.coverimg]];
    self.content.text = readListModel.content;
    self.name.text = readListModel.title;
}

// 根据收藏的模型来设置cell
- (void)setCellWithCollectionModel:(CollectionModel *)model {

    [self.coverimg sd_setImageWithURL:[NSURL URLWithString:model.coverimg]];
    self.content.text = model.title;
    self.name.text = model.name;
}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
